import { createApp } from 'vue'
import App from '@/App.vue'
//引入ElementPlus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//引入svg
import 'virtual:svg-icons-register'
//引入自定义插件对象：注册整个项目全局组件 并 安装（只要用app.use，就会触发install方法）
import globalComponents from '@/components'
//引入全局样式
import '@/styles/index.scss'

// import axios from 'axios'
import request from './utils/request'
request({
  url: '/user/login',
  method: 'post',
  data: {
    username: 'admin',
    password: '111111',
  },
})

//获取应用对象
const app = createApp(App)

//挂载
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(globalComponents)

app.mount('#app')
